/**
 * Copyright (c) 2015-2017, Henry Yang 杨勇 (gismail@foxmail.com).
 * <p>
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * <p>
 * http://www.apache.org/licenses/LICENSE-2.0
 * <p>
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.lambkit.module.cms.rpc.model.sql;

import com.lambkit.db.sql.ConditionMode;
import com.lambkit.db.sql.column.Column;
import com.lambkit.db.sql.column.Columns;
import com.lambkit.db.sql.column.Example;

import java.io.Serializable;
import java.util.List;

/**
 * @author yangyong 
 * @website: www.lambkit.com
 * @email: gismail@foxmail.com
 * @date 2020-02-23
 * @version 1.0
 * @since 1.0
 */
public class CmsMessageCriteria extends Columns implements Serializable {
	private static final long serialVersionUID = 1L;
	
	public static CmsMessageCriteria create() {
		return new CmsMessageCriteria();
	}
	
	public static CmsMessageCriteria create(Column column) {
		CmsMessageCriteria that = new CmsMessageCriteria();
		that.add(column);
        return that;
    }

    public static CmsMessageCriteria create(String name, Object value) {
        return (CmsMessageCriteria) create().eq(name, value);
    }
    
    public Example example() {
    	return Example.create("cms_message", this);
    }
    
    /**
     * equals
     *
     * @param name
     * @param value
     * @return
     */
    public CmsMessageCriteria eq(String name, Object value) {
    	super.eq(name, value);
        return this;
    }

    /**
     * not equals !=
     *
     * @param name
     * @param value
     * @return
     */
    public CmsMessageCriteria ne(String name, Object value) {
    	super.ne(name, value);
        return this;
    }


    /**
     * like
     *
     * @param name
     * @param value
     * @return
     */

    public CmsMessageCriteria like(String name, Object value) {
    	super.like(name, value);
        return this;
    }
    
    public CmsMessageCriteria notLike(String name, Object value) {
    	super.notLike(name, value);
        return this;
    }

    /**
     * 大于 great than
     *
     * @param name
     * @param value
     * @return
     */
    public CmsMessageCriteria gt(String name, Object value) {
    	super.gt(name, value);
        return this;
    }

    /**
     * 大于等于 great or equal
     *
     * @param name
     * @param value
     * @return
     */
    public CmsMessageCriteria ge(String name, Object value) {
    	super.ge(name, value);
        return this;
    }

    /**
     * 小于 less than
     *
     * @param name
     * @param value
     * @return
     */
    public CmsMessageCriteria lt(String name, Object value) {
    	super.lt(name, value);
        return this;
    }

    /**
     * 小于等于 less or equal
     *
     * @param name
     * @param value
     * @return
     */
    public CmsMessageCriteria le(String name, Object value) {
    	super.le(name, value);
        return this;
    }
    
    public CmsMessageCriteria isnull(String name) {
    	super.isnull(name);
        return this;
    } 

    public CmsMessageCriteria notNull(String name) {
    	super.notNull(name);
        return this;
    } 
    
    public CmsMessageCriteria empty(String name) {
    	super.empty(name);
        return this;
    } 
    
    public CmsMessageCriteria notEmpty(String name) {
    	super.notEmpty(name);
        return this;
    } 
    
    public CmsMessageCriteria add(Column column) {
    	super.add(column);
    	return this;
    }
    
    /**************************/
	
	public void addCriterion(String name, Object value, ConditionMode logic, String property, String typeHandler, String valueType) {
		 if (value == null) {
			 throw new RuntimeException("Value for " + property + " cannot be null");
		 }
		 add(Column.create(name, value, logic, typeHandler, valueType));
	}
   
	public void addCriterion(String name, Object value1, Object value2, ConditionMode logic, String property, String typeHandler, String valueType) {
		 if (value1 == null || value2 == null) {
			 throw new RuntimeException("Between values for " + property + " cannot be null");
		 }
		 add(Column.create(name, value1, value2, logic, typeHandler, valueType));
	}
		 
	public CmsMessageCriteria andMessageIdIsNull() {
		isnull("message_id");
		return this;
	}
	
	public CmsMessageCriteria andMessageIdIsNotNull() {
		notNull("message_id");
		return this;
	}
	
	public CmsMessageCriteria andMessageIdIsEmpty() {
		empty("message_id");
		return this;
	}

	public CmsMessageCriteria andMessageIdIsNotEmpty() {
		notEmpty("message_id");
		return this;
	}
       public CmsMessageCriteria andMessageIdEqualTo(java.lang.Long value) {
          addCriterion("message_id", value, ConditionMode.EQUAL, "messageId", "java.lang.Long", "Float");
          return this;
      }

      public CmsMessageCriteria andMessageIdNotEqualTo(java.lang.Long value) {
          addCriterion("message_id", value, ConditionMode.NOT_EQUAL, "messageId", "java.lang.Long", "Float");
          return this;
      }

      public CmsMessageCriteria andMessageIdGreaterThan(java.lang.Long value) {
          addCriterion("message_id", value, ConditionMode.GREATER_THEN, "messageId", "java.lang.Long", "Float");
          return this;
      }

      public CmsMessageCriteria andMessageIdGreaterThanOrEqualTo(java.lang.Long value) {
          addCriterion("message_id", value, ConditionMode.GREATER_EQUAL, "messageId", "java.lang.Long", "Float");
          return this;
      }

      public CmsMessageCriteria andMessageIdLessThan(java.lang.Long value) {
          addCriterion("message_id", value, ConditionMode.LESS_THEN, "messageId", "java.lang.Long", "Float");
          return this;
      }

      public CmsMessageCriteria andMessageIdLessThanOrEqualTo(java.lang.Long value) {
          addCriterion("message_id", value, ConditionMode.LESS_EQUAL, "messageId", "java.lang.Long", "Float");
          return this;
      }

      public CmsMessageCriteria andMessageIdBetween(java.lang.Long value1, java.lang.Long value2) {
    	  addCriterion("message_id", value1, value2, ConditionMode.BETWEEN, "messageId", "java.lang.Long", "Float");
    	  return this;
      }

      public CmsMessageCriteria andMessageIdNotBetween(java.lang.Long value1, java.lang.Long value2) {
          addCriterion("message_id", value1, value2, ConditionMode.NOT_BETWEEN, "messageId", "java.lang.Long", "Float");
          return this;
      }
        
      public CmsMessageCriteria andMessageIdIn(List<java.lang.Long> values) {
          addCriterion("message_id", values, ConditionMode.IN, "messageId", "java.lang.Long", "Float");
          return this;
      }

      public CmsMessageCriteria andMessageIdNotIn(List<java.lang.Long> values) {
          addCriterion("message_id", values, ConditionMode.NOT_IN, "messageId", "java.lang.Long", "Float");
          return this;
      }
	public CmsMessageCriteria andMessageTitleIsNull() {
		isnull("message_title");
		return this;
	}
	
	public CmsMessageCriteria andMessageTitleIsNotNull() {
		notNull("message_title");
		return this;
	}
	
	public CmsMessageCriteria andMessageTitleIsEmpty() {
		empty("message_title");
		return this;
	}

	public CmsMessageCriteria andMessageTitleIsNotEmpty() {
		notEmpty("message_title");
		return this;
	}
        public CmsMessageCriteria andMessageTitleLike(java.lang.String value) {
    	   addCriterion("message_title", value, ConditionMode.FUZZY, "messageTitle", "java.lang.String", "Float");
    	   return this;
      }

      public CmsMessageCriteria andMessageTitleNotLike(java.lang.String value) {
          addCriterion("message_title", value, ConditionMode.NOT_FUZZY, "messageTitle", "java.lang.String", "Float");
          return this;
      }
      public CmsMessageCriteria andMessageTitleEqualTo(java.lang.String value) {
          addCriterion("message_title", value, ConditionMode.EQUAL, "messageTitle", "java.lang.String", "String");
          return this;
      }

      public CmsMessageCriteria andMessageTitleNotEqualTo(java.lang.String value) {
          addCriterion("message_title", value, ConditionMode.NOT_EQUAL, "messageTitle", "java.lang.String", "String");
          return this;
      }

      public CmsMessageCriteria andMessageTitleGreaterThan(java.lang.String value) {
          addCriterion("message_title", value, ConditionMode.GREATER_THEN, "messageTitle", "java.lang.String", "String");
          return this;
      }

      public CmsMessageCriteria andMessageTitleGreaterThanOrEqualTo(java.lang.String value) {
          addCriterion("message_title", value, ConditionMode.GREATER_EQUAL, "messageTitle", "java.lang.String", "String");
          return this;
      }

      public CmsMessageCriteria andMessageTitleLessThan(java.lang.String value) {
          addCriterion("message_title", value, ConditionMode.LESS_THEN, "messageTitle", "java.lang.String", "String");
          return this;
      }

      public CmsMessageCriteria andMessageTitleLessThanOrEqualTo(java.lang.String value) {
          addCriterion("message_title", value, ConditionMode.LESS_EQUAL, "messageTitle", "java.lang.String", "String");
          return this;
      }

      public CmsMessageCriteria andMessageTitleBetween(java.lang.String value1, java.lang.String value2) {
    	  addCriterion("message_title", value1, value2, ConditionMode.BETWEEN, "messageTitle", "java.lang.String", "String");
    	  return this;
      }

      public CmsMessageCriteria andMessageTitleNotBetween(java.lang.String value1, java.lang.String value2) {
          addCriterion("message_title", value1, value2, ConditionMode.NOT_BETWEEN, "messageTitle", "java.lang.String", "String");
          return this;
      }
        
      public CmsMessageCriteria andMessageTitleIn(List<java.lang.String> values) {
          addCriterion("message_title", values, ConditionMode.IN, "messageTitle", "java.lang.String", "String");
          return this;
      }

      public CmsMessageCriteria andMessageTitleNotIn(List<java.lang.String> values) {
          addCriterion("message_title", values, ConditionMode.NOT_IN, "messageTitle", "java.lang.String", "String");
          return this;
      }
	public CmsMessageCriteria andMessageContentIsNull() {
		isnull("message_content");
		return this;
	}
	
	public CmsMessageCriteria andMessageContentIsNotNull() {
		notNull("message_content");
		return this;
	}
	
	public CmsMessageCriteria andMessageContentIsEmpty() {
		empty("message_content");
		return this;
	}

	public CmsMessageCriteria andMessageContentIsNotEmpty() {
		notEmpty("message_content");
		return this;
	}
        public CmsMessageCriteria andMessageContentLike(java.lang.String value) {
    	   addCriterion("message_content", value, ConditionMode.FUZZY, "messageContent", "java.lang.String", "String");
    	   return this;
      }

      public CmsMessageCriteria andMessageContentNotLike(java.lang.String value) {
          addCriterion("message_content", value, ConditionMode.NOT_FUZZY, "messageContent", "java.lang.String", "String");
          return this;
      }
      public CmsMessageCriteria andMessageContentEqualTo(java.lang.String value) {
          addCriterion("message_content", value, ConditionMode.EQUAL, "messageContent", "java.lang.String", "String");
          return this;
      }

      public CmsMessageCriteria andMessageContentNotEqualTo(java.lang.String value) {
          addCriterion("message_content", value, ConditionMode.NOT_EQUAL, "messageContent", "java.lang.String", "String");
          return this;
      }

      public CmsMessageCriteria andMessageContentGreaterThan(java.lang.String value) {
          addCriterion("message_content", value, ConditionMode.GREATER_THEN, "messageContent", "java.lang.String", "String");
          return this;
      }

      public CmsMessageCriteria andMessageContentGreaterThanOrEqualTo(java.lang.String value) {
          addCriterion("message_content", value, ConditionMode.GREATER_EQUAL, "messageContent", "java.lang.String", "String");
          return this;
      }

      public CmsMessageCriteria andMessageContentLessThan(java.lang.String value) {
          addCriterion("message_content", value, ConditionMode.LESS_THEN, "messageContent", "java.lang.String", "String");
          return this;
      }

      public CmsMessageCriteria andMessageContentLessThanOrEqualTo(java.lang.String value) {
          addCriterion("message_content", value, ConditionMode.LESS_EQUAL, "messageContent", "java.lang.String", "String");
          return this;
      }

      public CmsMessageCriteria andMessageContentBetween(java.lang.String value1, java.lang.String value2) {
    	  addCriterion("message_content", value1, value2, ConditionMode.BETWEEN, "messageContent", "java.lang.String", "String");
    	  return this;
      }

      public CmsMessageCriteria andMessageContentNotBetween(java.lang.String value1, java.lang.String value2) {
          addCriterion("message_content", value1, value2, ConditionMode.NOT_BETWEEN, "messageContent", "java.lang.String", "String");
          return this;
      }
        
      public CmsMessageCriteria andMessageContentIn(List<java.lang.String> values) {
          addCriterion("message_content", values, ConditionMode.IN, "messageContent", "java.lang.String", "String");
          return this;
      }

      public CmsMessageCriteria andMessageContentNotIn(List<java.lang.String> values) {
          addCriterion("message_content", values, ConditionMode.NOT_IN, "messageContent", "java.lang.String", "String");
          return this;
      }
	public CmsMessageCriteria andMessageToUserIdIsNull() {
		isnull("message_to_user_id");
		return this;
	}
	
	public CmsMessageCriteria andMessageToUserIdIsNotNull() {
		notNull("message_to_user_id");
		return this;
	}
	
	public CmsMessageCriteria andMessageToUserIdIsEmpty() {
		empty("message_to_user_id");
		return this;
	}

	public CmsMessageCriteria andMessageToUserIdIsNotEmpty() {
		notEmpty("message_to_user_id");
		return this;
	}
       public CmsMessageCriteria andMessageToUserIdEqualTo(java.lang.Long value) {
          addCriterion("message_to_user_id", value, ConditionMode.EQUAL, "messageToUserId", "java.lang.Long", "Float");
          return this;
      }

      public CmsMessageCriteria andMessageToUserIdNotEqualTo(java.lang.Long value) {
          addCriterion("message_to_user_id", value, ConditionMode.NOT_EQUAL, "messageToUserId", "java.lang.Long", "Float");
          return this;
      }

      public CmsMessageCriteria andMessageToUserIdGreaterThan(java.lang.Long value) {
          addCriterion("message_to_user_id", value, ConditionMode.GREATER_THEN, "messageToUserId", "java.lang.Long", "Float");
          return this;
      }

      public CmsMessageCriteria andMessageToUserIdGreaterThanOrEqualTo(java.lang.Long value) {
          addCriterion("message_to_user_id", value, ConditionMode.GREATER_EQUAL, "messageToUserId", "java.lang.Long", "Float");
          return this;
      }

      public CmsMessageCriteria andMessageToUserIdLessThan(java.lang.Long value) {
          addCriterion("message_to_user_id", value, ConditionMode.LESS_THEN, "messageToUserId", "java.lang.Long", "Float");
          return this;
      }

      public CmsMessageCriteria andMessageToUserIdLessThanOrEqualTo(java.lang.Long value) {
          addCriterion("message_to_user_id", value, ConditionMode.LESS_EQUAL, "messageToUserId", "java.lang.Long", "Float");
          return this;
      }

      public CmsMessageCriteria andMessageToUserIdBetween(java.lang.Long value1, java.lang.Long value2) {
    	  addCriterion("message_to_user_id", value1, value2, ConditionMode.BETWEEN, "messageToUserId", "java.lang.Long", "Float");
    	  return this;
      }

      public CmsMessageCriteria andMessageToUserIdNotBetween(java.lang.Long value1, java.lang.Long value2) {
          addCriterion("message_to_user_id", value1, value2, ConditionMode.NOT_BETWEEN, "messageToUserId", "java.lang.Long", "Float");
          return this;
      }
        
      public CmsMessageCriteria andMessageToUserIdIn(List<java.lang.Long> values) {
          addCriterion("message_to_user_id", values, ConditionMode.IN, "messageToUserId", "java.lang.Long", "Float");
          return this;
      }

      public CmsMessageCriteria andMessageToUserIdNotIn(List<java.lang.Long> values) {
          addCriterion("message_to_user_id", values, ConditionMode.NOT_IN, "messageToUserId", "java.lang.Long", "Float");
          return this;
      }
	public CmsMessageCriteria andMessageIsReadIsNull() {
		isnull("message_is_read");
		return this;
	}
	
	public CmsMessageCriteria andMessageIsReadIsNotNull() {
		notNull("message_is_read");
		return this;
	}
	
	public CmsMessageCriteria andMessageIsReadIsEmpty() {
		empty("message_is_read");
		return this;
	}

	public CmsMessageCriteria andMessageIsReadIsNotEmpty() {
		notEmpty("message_is_read");
		return this;
	}
       public CmsMessageCriteria andMessageIsReadEqualTo(java.lang.Integer value) {
          addCriterion("message_is_read", value, ConditionMode.EQUAL, "messageIsRead", "java.lang.Integer", "Float");
          return this;
      }

      public CmsMessageCriteria andMessageIsReadNotEqualTo(java.lang.Integer value) {
          addCriterion("message_is_read", value, ConditionMode.NOT_EQUAL, "messageIsRead", "java.lang.Integer", "Float");
          return this;
      }

      public CmsMessageCriteria andMessageIsReadGreaterThan(java.lang.Integer value) {
          addCriterion("message_is_read", value, ConditionMode.GREATER_THEN, "messageIsRead", "java.lang.Integer", "Float");
          return this;
      }

      public CmsMessageCriteria andMessageIsReadGreaterThanOrEqualTo(java.lang.Integer value) {
          addCriterion("message_is_read", value, ConditionMode.GREATER_EQUAL, "messageIsRead", "java.lang.Integer", "Float");
          return this;
      }

      public CmsMessageCriteria andMessageIsReadLessThan(java.lang.Integer value) {
          addCriterion("message_is_read", value, ConditionMode.LESS_THEN, "messageIsRead", "java.lang.Integer", "Float");
          return this;
      }

      public CmsMessageCriteria andMessageIsReadLessThanOrEqualTo(java.lang.Integer value) {
          addCriterion("message_is_read", value, ConditionMode.LESS_EQUAL, "messageIsRead", "java.lang.Integer", "Float");
          return this;
      }

      public CmsMessageCriteria andMessageIsReadBetween(java.lang.Integer value1, java.lang.Integer value2) {
    	  addCriterion("message_is_read", value1, value2, ConditionMode.BETWEEN, "messageIsRead", "java.lang.Integer", "Float");
    	  return this;
      }

      public CmsMessageCriteria andMessageIsReadNotBetween(java.lang.Integer value1, java.lang.Integer value2) {
          addCriterion("message_is_read", value1, value2, ConditionMode.NOT_BETWEEN, "messageIsRead", "java.lang.Integer", "Float");
          return this;
      }
        
      public CmsMessageCriteria andMessageIsReadIn(List<java.lang.Integer> values) {
          addCriterion("message_is_read", values, ConditionMode.IN, "messageIsRead", "java.lang.Integer", "Float");
          return this;
      }

      public CmsMessageCriteria andMessageIsReadNotIn(List<java.lang.Integer> values) {
          addCriterion("message_is_read", values, ConditionMode.NOT_IN, "messageIsRead", "java.lang.Integer", "Float");
          return this;
      }
	public CmsMessageCriteria andMessageTimeIsNull() {
		isnull("message_time");
		return this;
	}
	
	public CmsMessageCriteria andMessageTimeIsNotNull() {
		notNull("message_time");
		return this;
	}
	
	public CmsMessageCriteria andMessageTimeIsEmpty() {
		empty("message_time");
		return this;
	}

	public CmsMessageCriteria andMessageTimeIsNotEmpty() {
		notEmpty("message_time");
		return this;
	}
       public CmsMessageCriteria andMessageTimeEqualTo(java.util.Date value) {
          addCriterion("message_time", value, ConditionMode.EQUAL, "messageTime", "java.util.Date", "String");
          return this;
      }

      public CmsMessageCriteria andMessageTimeNotEqualTo(java.util.Date value) {
          addCriterion("message_time", value, ConditionMode.NOT_EQUAL, "messageTime", "java.util.Date", "String");
          return this;
      }

      public CmsMessageCriteria andMessageTimeGreaterThan(java.util.Date value) {
          addCriterion("message_time", value, ConditionMode.GREATER_THEN, "messageTime", "java.util.Date", "String");
          return this;
      }

      public CmsMessageCriteria andMessageTimeGreaterThanOrEqualTo(java.util.Date value) {
          addCriterion("message_time", value, ConditionMode.GREATER_EQUAL, "messageTime", "java.util.Date", "String");
          return this;
      }

      public CmsMessageCriteria andMessageTimeLessThan(java.util.Date value) {
          addCriterion("message_time", value, ConditionMode.LESS_THEN, "messageTime", "java.util.Date", "String");
          return this;
      }

      public CmsMessageCriteria andMessageTimeLessThanOrEqualTo(java.util.Date value) {
          addCriterion("message_time", value, ConditionMode.LESS_EQUAL, "messageTime", "java.util.Date", "String");
          return this;
      }

      public CmsMessageCriteria andMessageTimeBetween(java.util.Date value1, java.util.Date value2) {
    	  addCriterion("message_time", value1, value2, ConditionMode.BETWEEN, "messageTime", "java.util.Date", "String");
    	  return this;
      }

      public CmsMessageCriteria andMessageTimeNotBetween(java.util.Date value1, java.util.Date value2) {
          addCriterion("message_time", value1, value2, ConditionMode.NOT_BETWEEN, "messageTime", "java.util.Date", "String");
          return this;
      }
        
      public CmsMessageCriteria andMessageTimeIn(List<java.util.Date> values) {
          addCriterion("message_time", values, ConditionMode.IN, "messageTime", "java.util.Date", "String");
          return this;
      }

      public CmsMessageCriteria andMessageTimeNotIn(List<java.util.Date> values) {
          addCriterion("message_time", values, ConditionMode.NOT_IN, "messageTime", "java.util.Date", "String");
          return this;
      }
}